<!DOCTYPE html>
<html>

<head>
	<meta charset="utf-8">
	<meta name="viewport"
		content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
	<meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
	<title>title</title>
	<link rel="stylesheet" type="text/css" href="../css/api.css" />
	<link rel="stylesheet" type="text/css" href="../css/bootstrap.min.css" />
	<style>
		body {
			font: 14px/28px "微软雅黑";
		}

		.contact *:focus {
			outline: none;
		}

		.contact {
			height: auto;
			margin: 40px auto;
		}

		.contact ul {
			margin: 0 auto;
		}

		.contact ul li {
			border-bottom: 1px solid #dfdfdf;
			list-style: none;
			padding: 12px;
		}

		.contact ul li label {
			width: 120px;
			display: inline-block;
			float: left;
		}

		.contact ul li input[type=text],
		.contact ul li input[type=password] {
			width: 220px;
			height: 25px;
			border: 1px solid #aaa;
			padding: 3px 8px;
			border-radius: 5px;
		}

		.contact ul li input:focus {
			border-color: #c00;
		}

		.contact ul li input[type=text] {
			transition: padding .25s;
			-o-transition: padding .25s;
			-moz-transition: padding .25s;
			-webkit-transition: padding .25s;
		}

		.contact ul li input[type=password] {
			transition: padding .25s;
			-o-transition: padding .25s;
			-moz-transition: padding .25s;
			-webkit-transition: padding .25s;
		}

		.contact ul li input:focus {
			padding-right: 70px;
		}

		.btn {
			position: relative;
			left: 300px;
		}

		.tips {
			color: rgba(0, 0, 0, 0.5);
			padding-left: 10px;
		}

		.tips_true,
		.tips_false {
			padding-left: 10px;
		}

		.tips_true {
			color: green;
		}

		.tips_false {
			color: red;
		}

		td {
			border: 1px solid transparent !important;
		}
	</style>
</head>

<body>

	<table class="table table-striped" style="border: 0">


		<tbody id="tz" style="border: 0">
			<tr style="border: 0">
				<td>序号</td>
				<td>标题</td>
				<td>内容</td>

			</tr>
			<tr v-for="(n,index) in noticelist" @click="findone(n)" style="border: 0">
				<td><span style="margin-left: 10px">{{index+1}}</span></td>
				<td v-text="n.title"></td>
				<td v-text="n.content.substring(0,5)"></td>
			</tr>
		</tbody>
	</table>





	<!--<div class="contact" style="width: 100%" >
			<form name="form1" method="post">
				<ul  id="tz">
					<li v-for="(n,index) in noticelist" @click="findone(n)">
						<label>{{n.title}}</label>
						<span class="tips" id="divname">{{n.content}}</span>
					</li>
				</ul>
			</form>
		</div>-->
</body>
<script type="text/javascript" src="../script/api.js"></script>
<script type="text/javascript" src="../script/vue.js"></script>
<script type="text/javascript" src="../script/common.js"></script>
<script type="text/javascript" src="../script/jquery-1.11.0.min.js"></script>
<script type="text/javascript">
	apiready = function () {
		//項目id
		// var departid = $api.getStorage('selectpor').id
		var departid = null;
		var reg = $api.getStorage("userSession");
		var sids = reg.data.sysRole.sysRoleCode;
		var role = sids.role_number;
		if (role != "construction") {
			departid = $api.getStorage("selectpor").id;
		} else {
			departid = reg.data.areaid;
		}
		//用户信息
		var user = $api.getStorage('userSession').data;
		//通知列表
		var apps = new Vue({
			el: '#tz',
			data: {
				noticelist: []
			},
			created: function () {
				api.ajax({
					url: BaseServiceUrl + "mobile/notice/myFindAll.json",
					method: "post",
					data: {
						values: {
							id: user.id,
						},
					},
					timeout: 30,
					dataType: "json",
					returnAll: false,
				}, function (ret, err) {
					if (ret.code == 0) {
						for (var i = 0; i < ret.data.length; i++) {

							apps.noticelist.push(ret.data[i]);
						}
					}
				});
			},
			methods: {
				findone: function (n) {
					api.openWin({
						name: 'noticefindone_window',
						url: 'noticefindone_window.html',
						rect: {
							x: 0,
							y: 75,
							w: 'auto',
							h: 'auto'
						},
						pageParam: {
							result: n
						}, //传递参数
						bounces: true,
						delay: 200
					});
				}
			},
		});
	};
</script>

</html>